const puppeteer = require('puppeteer')
var {timeout,tableToJson} = require('../tools/tools.js');

// 以下拿掘金开刀,贡献私人测试账号
puppeteer.launch({headless: false}).then(async browser => {
    var page = await browser.newPage()
    page.setViewport({width: 1200, height: 600})

    /** 1. 到sf获取最新的前端文章 **/
    try {
        await page.goto('https://docs.open.alipay.com/api_3/alipay.offline.material.image.upload')
        await timeout(1000)
        var table=document.querySelector('#ant-api > table:nth-child(9)')
        var reqJson=tableToJson(table)
    } catch (e){
        console.log('sf err:', e);
    }
})
